<!DOCTYPE html>

<script src="../../../resources/js-test.js"></script>

<div id="host">
    <div id="inside"></div>
</div>

<script>
description("getComputedStyle should update style if the parent node in the flat tree needs a recalc.");

var root = document.getElementById("host").attachShadow({mode: 'open'});
var wrapper = root.appendChild(document.createElement("div"));
wrapper.appendChild(document.createElement("slot"));
wrapper.offsetTop;
wrapper.style.color = 'red';
var inside = document.getElementById("inside");
shouldBeEqualToString("getComputedStyle(inside).color", "rgb(255, 0, 0)");
</script>
